Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(es_extended): Extra callback functions #1505

Merged

Conversation

Mycroft-Studios
Copy link
Member

@Mycroft-Studios Mycroft-Studios commented Nov 25, 2024

Introduces 2 new functions:
ESX.DoesClientCallbackExist
ESX.DoesServerCallbackExist

@Mycroft-Studios Mycroft-Studios changed the base branch from main to dev November 25, 2024 19:15
@Kenshiin13
Copy link
Contributor

I don't see the point of this. ESX already throws an error if a resource attempts to access an invalid callback. This just promotes people calling ESX.DoesServerCallbackExist and ESX.DoesClientCallbackExist before every damn callback.

Third party resources can check if their dependencies are started and just assume that all expected callbacks are registered. We are already letting them know if they are not ^^

@Arctos2win
Copy link
Contributor

I don't see the point of this. ESX already throws an error if a resource attempts to access an invalid callback. This just promotes people calling ESX.DoesServerCallbackExist and ESX.DoesClientCallbackExist before every damn callback.

Third party resources can check if their dependencies are started and just assume that all expected callbacks are registered. We are already letting them know if they are not ^^

I agree with Kenshin on this one, there is 0 usecase for it and litterly no one ever requested a functionality like this
in the so many years this project exists.

[core]/es_extended/client/modules/callback.lua Outdated Show resolved Hide resolved
[core]/es_extended/server/modules/callback.lua Outdated Show resolved Hide resolved
@Kenshiin13
Copy link
Contributor

@Mycroft-Studios

@Kenshiin13 Kenshiin13 self-requested a review December 3, 2024 22:50
Copy link
Contributor

@Kenshiin13 Kenshiin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Mycroft-Studios Mycroft-Studios merged commit dc2256a into esx-framework:dev Dec 3, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Next Update
Development

Successfully merging this pull request may close these issues.

3 participants